package com.violet.myorm.core.page;

import lombok.Data;

import java.util.List;

@Data
public class Limit<E> {
    // 当前页的数据
    private final List<E> data;
    // 总数
    private final int total;
    // 每页显示的条数
    private final int pageSize;
    // 当前页码
    private final int pageNum;
    // 总页数
    private final int totalPage;

    public Limit(List<E> data, int total, int pageSize, int pageNum, int totalPage) {
        this.data = data;
        this.total = total;
        this.pageSize = pageSize;
        this.pageNum = pageNum;
        this.totalPage = totalPage;
    }
}
